package com.qianbao.service.step;


import com.qianbao.components.excepion.CommonException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;


@Component
@Configuration
@EnableScheduling
public class StepScheduleTask {

    // https://www.cnblogs.com/mmzs/p/10161936.html

    @Autowired
    private RunStepService service;

    @Scheduled(cron = "0 0 0 * * ?")
    private void stepConfigTask(){
        try {
            service.clearUserStep();
        } catch (CommonException e) {
            e.printStackTrace();
        }
    }

}
